var BookmarksTreeClick2Tab =
{
   bookmarksView : null,

   init : function ()
   {
      window.removeEventListener('load', function () { BookmarksTreeClick2Tab.init(); }, false);

      if (typeof(PlacesController) == "function") {
         TMP_Places.init();
         return;
      }

      TMP_Bookmark.init();

      this.bookmarksView = document.getElementById("bookmarks-view");
      eval("this.bookmarksView.openItemClick = " + this.bookmarksView.openItemClick.toString().replace(
         'var browserTarget = whereToOpenLink(aEvent);',
         'var browserTarget = whereToOpenLinkTabmix(aEvent, prefStringTMBookmark, selection, this.db);'
      ));

      eval("this.bookmarksView.openItemKey = " + this.bookmarksView.openItemKey.toString().replace(
         'BookmarksCommand.openBookmark(this._selection, "current", this.db)',
         '{var browserTarget = whereToOpenLinkTabmix(null, prefStringTMBookmark, this._selection, this.db); BookmarksCommand.openBookmark(this._selection, browserTarget, this.db);}'
      ));

   }

}
